package liill1.qyhuyg07;

import androidx.annotation.Keep;
import androidx.annotation.NonNull;

import java.util.Objects;
@Keep
public class DataPoint {
    private Double id; // 根据实际情况选择合适的类型，这里使用Double是因为JSON解析得到的数值默认为Double
    private Double dataTypeId;
    private String dataPointId;
    private Double androidId;

    // 构造器、getter和setter

    public DataPoint(Double id, Double dataTypeId, String dataPointId, Double androidId) {
        this.id = id;
        this.dataTypeId = dataTypeId;
        this.dataPointId = dataPointId;
        this.androidId = androidId;
    }

    public DataPoint() {
    }

    @NonNull
    @Override
    public String toString() {
        return "DataPoint{" +
                "id=" + id +
                ", dataTypeId=" + dataTypeId +
                ", dataPointId='" + dataPointId + '\'' +
                ", androidId=" + androidId +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DataPoint dataPoint = (DataPoint) o;
        return Objects.equals(id, dataPoint.id) && Objects.equals(dataTypeId, dataPoint.dataTypeId) && Objects.equals(dataPointId, dataPoint.dataPointId) && Objects.equals(androidId, dataPoint.androidId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, dataTypeId, dataPointId, androidId);
    }

    public Double getId() {
        return id;
    }

    public void setId(Double id) {
        this.id = id;
    }

    public Double getDataTypeId() {
        return dataTypeId;
    }

    public void setDataTypeId(Double dataTypeId) {
        this.dataTypeId = dataTypeId;
    }

    public String getDataPointId() {
        return dataPointId;
    }

    public void setDataPointId(String dataPointId) {
        this.dataPointId = dataPointId;
    }

    public Double getAndroidId() {
        return androidId;
    }

    public void setAndroidId(Double androidId) {
        this.androidId = androidId;
    }
}